<nz-spin [nzSpinning]="isSpinning" nzTip="{{'processing' | translate}}">
  <div class="panel-index-cont" style="padding: 10px;overflow-y:auto;">
    <div class="panel-index">
        <div class="hd" style="padding-bottom: 5px;border-bottom: 8px solid #D1D3DA;">
            <span style="padding-right:15px;">
                {{'dev_type' | translate}}:&nbsp;
                <span class="wt_600">{{LoginForm['name']}}</span>
            </span>
            <a (click)="exit()" class="cm-right">{{'sign_out' | translate}}</a>
        </div> 
      <div class="bd container">
        <div class="aside_left">       
          <div class="chart_container">
              <div style="padding: 5px;border-bottom:1px solid #D1D3DA"> 
                    <nz-switch  nzCheckedChildren="{{'running' | translate}}" nzUnCheckedChildren="{{'stoping' | translate}}" [(ngModel)]="state"  (ngModelChange)="stateChange()"></nz-switch>
                    <div style="display: inline-block;padding-left: 35px;">
                        <div *ngFor="let item of rfWaveOption2;let i=index;" style="display: inline-block;padding-right: 15px;">
                            <span class="antenna_name" [ngClass]="{'selectName': signalWave==item.value}" (click)="stateChange2(item.value)">{{item.title}}</span>
                            <span class="antenna_icon" [ngClass]="{'light-color': (i==0 && isW1LightShow) || (i==1 && isW2LightShow) || (i==2 && isBothLightShow)}"></span>
                        </div>
                    </div>
                </div>
              <div class="chart_content">
                <div class="chart_wave">
                  <div class="wave_title">
                  </div>
                  <div echarts  [options]="signalWaveOption" style="min-height:400px;height:100%;width:100%;" [hidden]="!state"></div> 
                </div>     
              </div>      
          </div>
          <div class="function_config">
            <div *ngFor="let data of rfWaveCmdList" nz-row>
              <label nz-col nzSpan="6">{{data.title}}</label>
              <span nz-col nzSpan="2" >{{data.min}}</span>
              <nz-progress [nzPercent]="currentKeyVal['key'+data.key]/data.max*100" [nzFormat]="formatOne" nz-col nzSpan="9" >
              </nz-progress>
              <span nz-col nzSpan="3" >{{data.max}}</span>
              <nz-input-number  [nzDisabled]="state" nzSpan="4" nz-col [nzMin]="data.min" [nzMax]="data.max"   [(ngModel)]="currentKeyVal['key'+data.key]" (ngModelChange)="sendAntConfigOrder(data.key,$event)"></nz-input-number>
            </div>
          </div>       
        </div>
        <div class="aside_right">
          <div class="right_one">
              <div class="wt_600" style="flex:1;">{{'eas_ant_performance_config' | translate}}</div>
              <div class="one_content">
                <div *ngFor="let data  of rfFunctionList" class="content_ele" nz-row>
                    <label nz-col nzSpan="6">{{data.title}}</label>
                    <span nz-col nzSpan="2" *ngIf="data.key!=='0b'">{{data.min}}</span>
                    <nz-progress [nzPercent]="currentKeyVal['key'+data.key]/data.max*100" [nzFormat]="formatOne" nz-col nzSpan="9" *ngIf="data.key!=='0e' && data.key!=='0b'"></nz-progress>
                    <nz-progress [nzPercent]="displayHitCount/data.max*100" [nzFormat]="formatOne" nz-col nzSpan="9" *ngIf="data.key=='0e' && data.key!=='0b'"></nz-progress>
                    <span nz-col nzSpan="3" *ngIf="data.key!=='0b'">{{data.max}}</span>
                    <nz-input-number  *ngIf="data.key!=='0e'&& data.key!=='0b'" [nzDisabled]="state" nzSpan="4" nz-col [nzMin]="data.min" [nzMax]="data.max" [(ngModel)]="currentKeyVal['key'+data.key]" (ngModelChange)="sendAntConfigOrder(data.key,$event)"></nz-input-number>
                    <nz-input-number  *ngIf="data.key=='0e'&& data.key!=='0b'" [nzDisabled]="state" nzSpan="4" nz-col [nzMin]="data.min" [nzMax]="data.max" [(ngModel)]="displayHitCount" (ngModelChange)="sendAntConfigOrder('0e',$event)"></nz-input-number>
                    <span nz-col nzSpan="9" *ngIf="data.key=='0b'">
                        <nz-select   style="float:right;width:120px;" [nzDisabled]="state"  [(ngModel)]="currentKeyVal['key'+data.key]" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                            <nz-option *ngFor="let item of bandWidthOption" [nzValue]="item.value" [nzLabel]="item.title"></nz-option>
                        </nz-select>
                    </span> 
                </div>
              </div>
          </div>
          <div class="right_two">
              <div class="wt_600" style="flex:1;margin-bottom: 8px">{{'eas_alarm_config' | translate}}</div>
              <button  nz-button nzType="primary" [disabled]="state" (click)="testAlarm()" style="padding:4px;">{{alarmTestItem['title']}}</button>
              <div *ngFor="let data of rfAlarmList">  
                  <label>{{data.title}}</label>
                  <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='03'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                    <label nz-radio-button *ngFor="let item of alermColorList" [nzValue]="item.value" [ngStyle]="{'color':currentKeyVal['key'+data.key]==item.value?'#fff':item.title,'background':item.title,'marginRight':'5px'}">{{currentKeyVal['key'+data.key]==item.value?'√':item.key}}</label>
                  </nz-radio-group> 
                  <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='19'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                    <label nz-radio-button *ngFor="let item of lightColorList" [nzValue]="item.value" [ngStyle]="{'color':currentKeyVal['key'+data.key]==item.value?'#fff':item.title,'background':item.title,'marginRight':'5px'}">{{currentKeyVal['key'+data.key]==item.value?'√':item.key}}</label>
                  </nz-radio-group> 
                  <nz-radio-group [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='01'" style="padding:0 6px;" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                    <label nz-radio-button *ngFor="let item of toneList" [nzValue]="item.value">{{item.title}}</label>
                  </nz-radio-group> 
                  <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='02'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                    <label nz-radio-button *ngFor="let item of soundLengthLish" [nzValue]="item.value">{{item.title}}</label>
                  </nz-radio-group> 
                  <nz-radio-group  [nzDisabled]="state" [(ngModel)]="currentKeyVal['key'+data.key]"  *ngIf="data.key=='0c'" (ngModelChange)="sendAntConfigOrder(data.key,$event)">
                    <label nz-radio-button *ngFor="let item of alermEnableList" [nzValue]="item.value">{{item.title}}</label>
                  </nz-radio-group> 
              </div>
          </div>
          <div class="right_four">
              <div class="wt_600" style="flex:1;">{{'more_info' | translate}}</div>
              <div class="four_content">
                <div>{{'hardware_version' | translate}}：{{currentKeyVal['key00']}}</div>
                <div>{{'software_version' | translate}}：1.1.12</div>
              </div>
          </div>
        </div>
      </div>
      <div class="footer">
          <a (click)="readParam()">{{readParamItem['title']}}</a>
          <nz-divider nzType="vertical"></nz-divider>
          <a (click)="restoreFactory()">{{restoreFactoryItem['title']}}</a>
      </div>
    </div>
  </div>
</nz-spin>

